package com.example.design_pattern.command;

/**
 * 请求者，按键面板
 */
public class KeyPad {

    private Command mStartCommand;

    private Command mStopCommand;

    public KeyPad(Command mStartCommand, Command mStopCommand){
        this.mStartCommand = mStartCommand;
        this.mStopCommand = mStopCommand;
    }

    public void start(){
        mStartCommand.execute();
    }

    public void stop(){
        mStopCommand.execute();
    }

}
